<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      class A {
        age = 100;
        name = "lili";
        say() {
          console.log("hello");
        }
      }
      class B extends A {
        name = "jack";
      }
      class C extends B {
        gender = "boy";
      }
      class D extends C {}

      const d = new D();
      console.log(d);
      console.log(d.age);
      d.say();
    </script>
  </body>
</html>
